using System;
using System.Collections.Generic;
using System.Text;
using SlimDX;
using SlimDX.Direct3D9;
using System.Runtime.InteropServices;

namespace Barrage.Global.Vertex
{
    /// <summary>
    /// Vertex format holding vertex position
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public struct VertexPosition
    {
        /// <summary>
        /// Vertex position
        /// </summary>
        public Vector3 Position;

        /// <summary>
        /// Size in bytes of the structure
        /// </summary>
        public static int SizeBytes
        {
            get { return Marshal.SizeOf(typeof(VertexPosition)); }
        }

        /// <summary>
        /// VertexFormat declaration
        /// </summary>
        public static VertexFormat Format
        {
            get { return VertexFormat.Position; }
        }

        /// <summary>
        /// Constructor. Inits values.
        /// </summary>
        /// <param name="position">Vertex position</param>
        public VertexPosition(Vector3 position)
        {
            this.Position = position;
        }
    }
}